package com.qs.core.manager;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class ServiceLocator implements ApplicationContextAware {

	private static ApplicationContext applicationContext;
	
	@Override
	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {

		ServiceLocator.applicationContext = applicationContext;
	}

	public static Object getBean(String beanId)
	{
		return applicationContext.getBean(beanId);
	}
}